export const lightFn = (str, target) => {
    // target就是输入框内的值
    const reg = new RegExp(target, 'ig')

    return str.replace(reg, (match) => { // match是关键字匹配的值(尽量保持原样)
        return `<span style="color: red">${match}</span>`
    })
}